<template>
    <div class="comment-list">
      <div v-for="comment in comments" :key="comment">
        <comment-show v-bind:comment-info="{avatar:comment.user.avatar, time:comment.created_at,
         nickname:comment.user.nickname, content:comment.content, id:comment.id,userId:comment.user.id}" ></comment-show>
        <el-divider></el-divider>
      </div>
      <comment-show></comment-show>
    </div>
</template>

<script>
import commentShow from './CommentShower'

export default {
  name: 'CommentLister',

  data () {
    return {
      comments: [],
      start: 0,
      limit: 10,
      total: 0
    }
  },
  props: ['type'],
  components: {
    commentShow
  },

  methods: {
    load () {
      this.comments = [{ user: { nickname: 'zz奶茶君' }, created_at: 1255315222, content: '好！！' }]
    }
  },

  beforeMount () {
    this.load()
  }
}
</script>

<style scoped>

</style>
